package com.health.healthproject.config;

import com.health.healthproject.util.FileUploadUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
public class FileUploadConfig {

    @Value("${app.file-storage.base-path}")
    private String baseUploadPath;

    @PostConstruct
    public void init() {
        FileUploadUtil.setBasePath(baseUploadPath);
    }
}